﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Mes.Pendant.UnitMeasureW;
using Mes.Pendant.UnitMeasures.Dto;
using Volo.Abp.Application.Dtos;

namespace Mes.Pendant.UnitMeasures
{
    //public interface IUnitMeasureService : IApplicationService
    //{
    //    UnitMeasure GetUnitMeasure();
    //}
    public interface IUnitMeasureService: ICrudAppService<UnitMeasureDto,int, PagedResultRequestDto, UnitMeasureDto>
    {
        /// <summary>
        /// 获取计量单位列表
        /// </summary>
        /// <param name="customerCode"></param>
        /// <param name="customerName"></param>
        /// <param name="isEffective"></param>
        /// <returns></returns>
        (List<UnitMeasureDto> list, int total) GetCustomerList(string? customerCode, string? customerName, int isEffective, int page, int limit);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="unitMeasure"></param>
        /// <returns></returns>
        Task<int> CreatUnitMeasureInfo(UnitMeasureDto unitMeasure);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="unitMeasure"></param>
        /// <returns></returns>
        Task<int> UpdateUnitMeasureInfos(UnitMeasureDto unitMeasure);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="unitMeasureId"></param>
        /// <returns></returns>
        Task<int> DeleteUnitMeasureInfo(int id);

        /// <summary>
        /// 根据id获取数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<UnitMeasureDto> GetUnitMeasureById(int id);

        //获取主单位
        List<UnitMeasureDto> GetMainUnits(int isMainUnit);



    }
}
